#include "teamdialog.h"
#include "ui_teamdialog.h"
#include "operation.h"
#include <QString>
#include <QMessageBox>
#include <stdio.h>


TeamDialog::TeamDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::TeamDialog)
{
    ui->setupUi(this);
    ui->lineEdit_2->setEchoMode(QLineEdit::Password);
    ui->lineEdit->setAlignment(Qt::AlignHCenter);
    ui->lineEdit_2->setAlignment(Qt::AlignHCenter);
}

TeamDialog::~TeamDialog()
{
    delete ui;
}

void TeamDialog::on_pushButton_2_clicked()//转到注册
{
    accept();
}

void TeamDialog::on_pushButton_clicked()//确认登录
{

    char n;
    if(true//ui->lineEdit->text()==tr("QT")&&ui->lineEdit_2->text()==tr("123456")
            )
    {
        login_window.show();
        reject();
    }
    else
    {
          QMessageBox::warning(this,tr("warning"),tr("用户名或密码错误!"),QMessageBox::Yes);
          ui->lineEdit->clear();
          ui->lineEdit_2->clear();
          ui->lineEdit->setFocus();
    }
}

